package cqie.frame.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 此表为用户表，表明用户的基本信息，如用户名称，登录账号密码，状态等。
 * </p>
 *
 * @author HHL
 * @since 2021-09-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_user")
@ApiModel(description = "用户表")
public class SysUser extends Model<SysUser> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    @TableField(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 用户名称
     */
    @TableField(value = "name")
    @ApiModelProperty(value = "用户名称")
    private String name;
    /**
     * 登录账号
     */
    @TableField(value = "account")
    @ApiModelProperty(value = "用户账号")
    private String account;
    /**
     * 登录密码
     */
    @TableField(value = "password")
    @ApiModelProperty(value = "用户密码")
    private String password;
    /**
     * 用户状态（0：正常  1：禁用）
     */
    @TableField(value = "status")
    @ApiModelProperty(value = "用户状态（0：正常  1：禁用）")
    private Integer status;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
